﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using GeoWeb.Common;

namespace GeoWeb.Demo.Commons
{
    public partial class GeoCollection : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            funcollection();
        }

        #region DictionarySet
        private void funcollection()
        {
            //集合A
            DictionarySet<string> set1 = new DictionarySet<string>();
            set1.Add("a");
            set1.Add("b");
            set1.Add("c");

            //集合B
            DictionarySet<string> set2 = new DictionarySet<string>();
            set2.Add("b");
            set2.Add("d");
            set2.Add("e");

            //交集
            //结果应该是 b
            IGeoSet<string> intersect = set1.Intersect(set2);
            //并集
            //结果应该是 a、b、c、d、e
            IGeoSet<string> union = set1.Union(set2);
            //补集合集
            //结果应该是 a、c、d、e
            IGeoSet<string> exc = set1.ExclusiveOr(set2);
            //补集
            //结果应该是 a、c
            IGeoSet<string> diff = set1.Minus(set2);
            //

        }
        #endregion
    }
}